// src/api/types/order.ts
// 订单管理-获取订单列表 接口返回数据类型
export interface OrderListResponse {
  msg: string;
  code: string;
  result: OrderItem[];
}

// 单个订单项的数据结构
export interface OrderItem {
  id: string;
  new_orderid: string;
  orderstatus: string;
  countdown: number;
  ordertype: string;
  addressid: string;
  addressname: string;
  note: string;
  phone: string;
  finallprice: number;
  expiretime: number;
  psTime: string; // 注意：这里字段名是 psTime，与返回数据中的 psTime 对应
  createtime: string;
  totalNum: number;
  meal_list: MealItem[]; // 餐品列表
}

// 餐品项的数据结构
export interface MealItem {
  id: number;
  name: string;
  mealdesc: string;
  price: number;
  picture: string;
  taste: string;
  mealtype: string;
  mealdate: string;
  shopid: string;
  shopname: number; // 注意：这里 shopname 是 number 类型，与返回数据对应
  count: number;
  stock: number;
}

// 获取订单列表的请求参数
export interface GetOrderListParams {
  orderdate: string;
  orderstatus: string;
}